package lab02.test29;

public class Test29{
    public static void main(String[] args) {
        int[] a=new int[]{1,2,3,4,5,6};
        try{
            for (int i=0;i<=6;i++){
                System.out.println(a[i]);
            }
        }catch (ArrayIndexOutOfBoundsException E){
            System.out.println("数组越界");
        }finally {
           System.out.println("程序结束");
        }

    }
}
